
$(function () {
    initCommob();
})


function initCommob() {
    $.ajax({
        type:"POST",
        url:'/actDeployment/findAllDeploy',
        dataType:'json',
        async:true,
        success:function(result){
            result.unshift({"id":"","text":"全部"});
            $("#departmentId").combobox({
                data:result,
                valueField:'id',
                textField:'text'
            });
        }
    });
}
function closeWindow() {
    $('#processOwn_add_dialog').dialog("close");
}

function commit() {
    $("#createDepartment").form('submit',{
        url:'/processOwn/insert',
        onSubmit:function(){
            return $(this).form('validate');
        },
        success:function(data){
          var result = eval('(' + data + ')');
            if(result.status=="success"){
                window.parent.initDataGrid();
                closeWindow();
            }else{
                $.messager.alert('提示',data.msg);
            }
        }
    });
}

